package com.yilife.hmstr;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;

import javax.servlet.MultipartConfigElement;


@MapperScan("com.yilife.hmstr.mapper*")
@SpringBootApplication
public class HmstrApplication {

	/**
	 * 文件上传临时路径
	 */
	@Bean
	MultipartConfigElement multipartConfigElement() {
		MultipartConfigFactory factory = new MultipartConfigFactory();
		//factory.setLocation("/upload/");
		return factory.createMultipartConfig();
	}

	public static void main(String[] args) {
		SpringApplication.run(HmstrApplication.class, args);


	}
}
